package day15_tasks;

public class Test {
    public static void main(String[] args) {
        OldPhone op = new OldPhone();
        NewPhone np = new NewPhone();

        usePhone(op);
        usePhone(np);

    }

    public static void usePhone(Phone phone){
        phone.call();
        phone.mail();
        if(phone instanceof NewPhone){
            ((NewPhone)phone).playGame();
        }
    }
}
